/*
 * @Author: taoyuqing
 * @Date: 2023-02-26 17:16:38
 * @Description: 
 */
import 'package:flutter/material.dart';

class GameTitleBar extends StatelessWidget {
  final String? gameName;
  final Function? ontap;
  const GameTitleBar({Key? key, this.gameName, this.ontap}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Padding(
      padding: EdgeInsets.only(top: 10, bottom: 10),
      child: Row(
        children: [
          Text(
            gameName ?? '',
            style: TextStyle(
                color: Colors.white, fontSize: 16, fontWeight: FontWeight.w800),
          ),
          Expanded(
              child: Row(
            mainAxisAlignment: MainAxisAlignment.end,
            children: [
              GestureDetector(
                onTap: () {
                  if (ontap != null) {
                    ontap!('info');
                  }
                },
                child: Image.asset(
                  'images/info.png',
                  width: 20,
                ),
              )
            ],
          ))
        ],
      ),
    );
  }
}
